package com.ning.service;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

@Service//放入Spring容器
public class UserService {
    //从服务中心调用服务
    @Reference//引用，pom坐标;定义路径相同的接口。
    private ProductService productService;

    public void buyProduct(){
        String product = productService.getProduct();
        System.out.println(product);
    }
}
